Treatment of hypomagnesemia